/* 需求详情页面样式 */

/* 需求状态标签 */
.requirement-status {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.requirement-status.status-draft {
    background-color: #6c757d;
    color: white;
}

.requirement-status.status-analysis {
    background-color: #0dcaf0;
    color: white;
}

.requirement-status.status-approved {
    background-color: #198754;
    color: white;
}

.requirement-status.status-in-development {
    background-color: #fd7e14;
    color: white;
}

.requirement-status.status-completed {
    background-color: #20c997;
    color: white;
}

.requirement-status.status-rejected {
    background-color: #dc3545;
    color: white;
}

.requirement-status.status-cancelled {
    background-color: #6f42c1;
    color: white;
}

/* 优先级标签 */
.requirement-priority {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.requirement-priority.priority-low {
    background-color: #198754;
    color: white;
}

.requirement-priority.priority-medium {
    background-color: #ffc107;
    color: #000;
}

.requirement-priority.priority-high {
    background-color: #fd7e14;
    color: white;
}

.requirement-priority.priority-urgent {
    background-color: #dc3545;
    color: white;
}

/* 状态流转组件 */
.status-flow {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-step {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.status-step:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.status-step.active {
    background-color: #e7f3ff;
    border-color: #0d6efd;
    color: #0d6efd;
}

.status-step.completed {
    background-color: #d1e7dd;
    border-color: #198754;
    color: #198754;
}

.status-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.status-step.active .status-icon {
    background-color: #0d6efd;
    color: white;
}

.status-step.completed .status-icon {
    background-color: #198754;
    color: white;
}

.status-label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* 文档列表 */
.document-item {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background-color: #fff;
    transition: all 0.3s ease;
}

.document-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.document-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.document-title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
}

.document-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #e9ecef;
    color: #495057;
    margin-left: auto;
}

.document-type.type-specification {
    background-color: #cff4fc;
    color: #055160;
}

.document-type.type-design {
    background-color: #f8d7da;
    color: #721c24;
}

.document-type.type-prototype {
    background-color: #fff3cd;
    color: #856404;
}

.document-type.type-reference {
    background-color: #d1ecf1;
    color: #0c5460;
}

.document-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.document-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* 任务列表 */
.task-item {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #fff;
    transition: all 0.3s ease;
}

.task-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.task-title {
    font-weight: 500;
    color: #212529;
    margin: 0;
}

.task-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.task-status.status-todo {
    background-color: #e9ecef;
    color: #495057;
}

.task-status.status-in-progress {
    background-color: #cff4fc;
    color: #055160;
}

.task-status.status-done {
    background-color: #d1e7dd;
    color: #0f5132;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 操作历史 */
.history-item {
    border-left: 3px solid #e9ecef;
    padding-left: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.history-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e9ecef;
}

.history-item.type-create {
    border-left-color: #198754;
}

.history-item.type-create::before {
    background-color: #198754;
}

.history-item.type-update {
    border-left-color: #0dcaf0;
}

.history-item.type-update::before {
    background-color: #0dcaf0;
}

.history-item.type-status {
    border-left-color: #fd7e14;
}

.history-item.type-status::before {
    background-color: #fd7e14;
}

.history-item.type-assign {
    border-left-color: #6f42c1;
}

.history-item.type-assign::before {
    background-color: #6f42c1;
}

.history-action {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.25rem;
}

.history-details {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.history-time {
    color: #6c757d;
    font-size: 0.8rem;
}

/* 加载遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loading-spinner {
    text-align: center;
    color: #0d6efd;
}

.loading-overlay.d-none {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .status-flow {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .status-step {
        flex-direction: column;
        min-width: 80px;
        text-align: center;
        padding: 0.5rem;
    }
    
    .status-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .status-label {
        font-size: 0.8rem;
    }
    
    .document-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .document-type {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .task-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .task-status {
        margin-top: 0.5rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* 卡片阴影效果 */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* 按钮组样式优化 */
.btn-toolbar .btn-group {
    margin-right: 0.5rem;
}

.btn-toolbar .btn-group:last-child {
    margin-right: 0;
}

/* 表单样式优化 */
.form-label {
    font-weight: 500;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 模态框样式优化 */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.modal-title {
    color: #495057;
    font-weight: 600;
}

/* Toast 通知样式 */
.toast {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: #212529;
    color: #fff;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
}

/* 徽章样式优化 */
.badge {
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* 链接样式 */
a {
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}